require('@babel/runtime/helpers/Arrayincludes');
var e = require('@babel/runtime/helpers/regeneratorRuntime'),
  r = require('@babel/runtime/helpers/asyncToGenerator');
require('umtrack-wx');
var n,
  t = require('js/A9B0993670B67DCFCFD6F1317FB01B27.js'),
  i = require('js/A2F8D42770B67DCFC49EBC20DAD11B27.js'),
  s = require('js/43946F9670B67DCF25F2079172A01B27.js'),
  a = require('js/D28B336470B67DCFB4ED5B639AB21B27.js'),
  o = require('js/50B4FDC770B67DCF36D295C0D7C21B27.js'),
  c = require('js/1E1DDD9770B67DCF787BB59075001B27.js'),
  u = new o();
App({
  $api: t,
  WX_AD: u,
  statisticsApi: i,
  DataReport: s,
  util: a,
  CONFIG: c,
  initApp: a.initApp(),
  getSystemInfo: a.getSystemInfo(),
  scene: 0,
  umengConfig: {
    appKey: '5f815fa394846f78a96edac0',
    useOpenid: !1,
    autoGetOpenid: !1,
    debug: !1,
    uploadUserInfo: !0,
  },
  globalData: {
    qrObj: {},
    temp_code_src_map: {},
    temp_canvas_src_map: {},
    SDKVersion: '0.0.1',
    scene: void 0,
    wasPopedCoupon: !1,
    wwHasInviteId: 0,
    wwHasInvite_query: 0,
    baseUrl: '',
    SHARE_IMG: c.SHARE_IMG,
    SHARE_TITLE: c.SHARE_TITLE,
    APP_NAME: c.APP_NAME,
  },
  onLaunch:
    ((n = r(
      e().mark(function r(n) {
        return e().wrap(
          function (e) {
            for (;;)
              switch ((e.prev = e.next)) {
                case 0:
                  wx.removeStorageSync('__cartNum'),
                    wx.removeStorageSync('informationGathering_tweetToBuy_id'),
                    a.keepScreenOn(),
                    a.appUpdata(),
                    this.getSystemInfo(this),
                    this.initApp(this),
                    a.overShare(),
                    n.query.gdt_vid &&
                      (console.warn('app onLaunch options: ', n),
                      this.WX_AD.addTask('init', { query: n.query, force: 0 }),
                      this.WX_AD.addTask('userActions', {
                        key: 'REGISTER',
                        keyName: '注册',
                        action_param: {},
                      }));
                case 8:
                case 'end':
                  return e.stop();
              }
          },
          r,
          this,
        );
      }),
    )),
    function (e) {
      return n.apply(this, arguments);
    }),
  onShow: function (e) {
    console.error('app onShow in:___________', e);
    var r = !1;
    if (
      [
        1e3, 1001, 1005, 1006, 1014, 1017, 1019, 1020, 1022, 1023, 1024, 1026,
        1027, 1028, 1029, 1035, 1039, 1042, 1043, 1052, 1053, 1054, 1056, 1057,
        1058, 1059, 1068, 1071, 1073, 1074, 1077, 1078, 1079, 1081, 1082, 1088,
        1089, 1090, 1091, 1092, 1095, 1096, 1102, 1103, 1104, 1107, 1113, 1114,
        1129, 1133, 1135, 1144, 1145, 1146, 1148, 1150, 1151, 1153, 1157, 1169,
        1171, 1173, 1183, 1189, 1192,
      ].includes(e.scene) &&
      (wx.removeStorageSync('rid'), (e.query.rid = 0), e.query.scene)
    ) {
      var n = decodeURIComponent(e.query.scene).split(',');
      (n[1] = ''), (e.query.scene = encodeURIComponent(n.join(',')));
    }
    if (
      (this.scene !== e.scene && ((this.scene = e.scene), (r = !0)),
      this.scene === e.scene)
    )
      if (e.query.scene) {
        var t = decodeURIComponent(e.query.scene).split(',');
        ((t[1] ? t[1] : 0) == wx.getStorageSync('rid') &&
          t[0] == this.globalData.qrObj.id &&
          t[3] == this.globalData.qrObj.scene) ||
          (r = !0);
      } else e.query.rid && (r = !0);
    r &&
      (wx.removeStorageSync('rid'),
      wx.removeStorageSync('UpMemberInfo'),
      wx.setStorageSync('sentCode', 0),
      a.handleOptions()(e, this),
      a.handleLiveOptions(e));
  },
});
